<template>
	<view class="doclist">
		<view class="doc_title font16 font-b font-323232">{{name}}专家共有<text class="font-ff4646">{{listnum}}</text>名医生</view>
		<view class="doclist_bos">
			<view class="doclist_box" @click="Ondocinfo(item)" v-for="(item,index) in datalist" :key="index">
			 <image :src="item.img" mode="aspectFill"></image>
					<view class="doc_list">
					<view class="font14 font-323232 font-b">{{item.name}}</view>
					<view class="font14 font-969696">{{item.academic_title_name.name}}</view>
					<view class="font12 font-969696 ellipsis">业务专场:{{item.be_good_at}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		onLoad: function(options) {
			this.id = options.id
			this.name = options.name
			//获取医生列表
			this.Ondoctorlist()
		},
		data() {
			return {
				id: null,
				datalist: [],//数据
				name:'',//标题
				listnum:0
			}
		},
		methods: {
			//获取医生列表
			Ondoctorlist() {
				this.$Http({
					url: 'doctor',
					token: false,
					data: {
						room_id: this.id
					}
				}).then(res => {
					res.data.forEach(item => {
						item.img = this.$store.state.http_img + item.img
					})
					this.datalist = res.data
					this.listnum = res.data.length
				})
			},
			//医生详情页面
			Ondocinfo(e) {
				uni.navigateTo({
					url: '/pagesA/info/docinfo?id='+e.id,
				})
			},
		}
	}
</script>

<style>
	.doc_title {
		height: 100rpx;
		width: 750rpx;
		line-height: 100rpx;
		text-align: center;
		background-color: #f9f9f9;
		border-bottom: 1rpx #ececec solid;
	}

	.doc_title text {
		margin: 0 10rpx;
	}

	.doclist_box {
		width: 690rpx;
		display: flex;
		padding: 30rpx 0;
		margin: 0 30rpx;
		border-bottom: 1rpx #ededed solid;
	}

	.doclist_box image {
		height: 130rpx;
		width: 120rpx;
		border-radius: 10rpx;
		margin-right: 35rpx;
	}

	.doc_list {
		width: 535rpx;
		height: 130rpx;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
	}

	.doc_list view {
		width: 535rpx;
	}
</style>
